|
Protege 3.4.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.smi.protege.model.framestore.MergingNarrowFrameStore
public class MergingNarrowFrameStore
All queries go to all frame stores. Writes go to the primary (delegate) frame store.
| Constructor Summary | |
|---|---|
MergingNarrowFrameStore(Object kbLock)
|
|
| Method Summary | |
|---|---|
void |
addActiveChildFrameStore(NarrowFrameStore childFrameStore,
String parentName)
|
void |
addActiveFrameStore(NarrowFrameStore frameStore)
|
void |
addActiveFrameStore(NarrowFrameStore parent,
Collection childNames)
|
void |
addRelation(String parent,
String child)
|
void |
addValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
boolean |
beginTransaction(String name)
|
void |
close()
|
boolean |
commitTransaction()
|
void |
deleteFrame(Frame frame)
|
void |
dumpFrameStores()
|
void |
dumpFrameStores(Level lev)
|
void |
executeQuery(Query query,
QueryCallback callback)
The executeQuery method allows for complex queries. |
static MergingNarrowFrameStore |
get(KnowledgeBase kb)
A utility hack to get the merging frame store from a kb until I can decide what sort of "real" API access to provide. |
NarrowFrameStore |
getActiveFrameStore()
|
Collection<NarrowFrameStore> |
getAllFrameStores()
|
Collection<NarrowFrameStore> |
getAvailableFrameStores()
|
Set |
getClosure(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
int |
getClsCount()
|
NarrowFrameStore |
getDelegate()
|
int |
getFacetCount()
|
Frame |
getFrame(FrameID id)
|
int |
getFrameCount()
|
Set |
getFrames()
|
Set |
getFrames(Slot slot,
Facet facet,
boolean isTemplate,
Object value)
|
NarrowFrameStore |
getFrameStore(String name)
|
Set |
getFramesWithAnyValue(Slot slot,
Facet facet,
boolean isTemplate)
|
Set<Frame> |
getMatchingFrames(Slot slot,
Facet facet,
boolean isTemplate,
String value,
int maxMatches)
|
Set<Reference> |
getMatchingReferences(String value,
int maxMatches)
|
String |
getName()
The Narrow Frame store has a standard set/get name interface. |
Slot |
getNameSlot()
|
static NarrowFrameStore |
getNarrowFrameStore(KnowledgeBase kb,
Class clazz)
|
Set<Reference> |
getReferences(Object value)
|
int |
getSimpleInstanceCount()
|
int |
getSlotCount()
|
NarrowFrameStore |
getSystemFrameStore()
|
static NarrowFrameStore |
getSystemFrameStore(KnowledgeBase kb)
|
NarrowFrameStore |
getTopFrameStore()
|
TransactionMonitor |
getTransactionStatusMonitor()
Retrieves a transaction status monitor for transactions. |
List |
getValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
Obtains the values of a slot/facet to a frame. |
int |
getValuesCount(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
|
void |
moveValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
int from,
int to)
Retrieves the list of values associated with the (frame, slot, facet, isTemplate) combination and moves the item at the position from to the position to. |
void |
reinitialize()
|
void |
removeFrameStore(NarrowFrameStore frameStore)
|
void |
removeValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
|
void |
replaceFrame(Frame frame)
A complete hack to work around problems with the java packages feature |
void |
replaceFrame(Frame original,
Frame replacement)
Replace all references of the frame original with the frame replacement. |
boolean |
rollbackTransaction()
|
NarrowFrameStore |
setActiveFrameStore(NarrowFrameStore nfs)
|
NarrowFrameStore |
setActiveFrameStore(String name)
|
boolean |
setCaching(RemoteSession session,
boolean doCache)
|
void |
setName(String name)
The Narrow Frame store has a standard set/get name interface. |
void |
setQueryAllFrameStores(boolean b)
|
void |
setRemoveFrameStores(Collection<NarrowFrameStore> narrowFrameStores)
Set frame stores to remove values from. |
void |
setSuppressDuplicates(boolean suppressDuplicates)
|
void |
setTopFrameStore(String name)
Sets the top frame store, used to decide the root below which all framesstores are "available". |
void |
setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MergingNarrowFrameStore(Object kbLock)
| Method Detail |
|---|
public static MergingNarrowFrameStore get(KnowledgeBase kb)
public static NarrowFrameStore getSystemFrameStore(KnowledgeBase kb)
public static NarrowFrameStore getNarrowFrameStore(KnowledgeBase kb,
Class clazz)
public NarrowFrameStore getSystemFrameStore()
public Collection<NarrowFrameStore> getAvailableFrameStores()
public Collection<NarrowFrameStore> getAllFrameStores()
public String getName()
NarrowFrameStore
getName in interface NarrowFrameStorepublic void setName(String name)
NarrowFrameStore
setName in interface NarrowFrameStorename - - the name of the Narrow Frame Store.public NarrowFrameStore getActiveFrameStore()
public void setRemoveFrameStores(Collection<NarrowFrameStore> narrowFrameStores)
narrowFrameStores - Collection of NarrowFrameStorespublic NarrowFrameStore getFrameStore(String name)
public void addRelation(String parent,
String child)
public void dumpFrameStores()
public void dumpFrameStores(Level lev)
public void addActiveFrameStore(NarrowFrameStore frameStore)
public void addActiveChildFrameStore(NarrowFrameStore childFrameStore,
String parentName)
public void removeFrameStore(NarrowFrameStore frameStore)
public void addActiveFrameStore(NarrowFrameStore parent,
Collection childNames)
public Slot getNameSlot()
public void setTopFrameStore(String name)
public NarrowFrameStore getTopFrameStore()
public NarrowFrameStore setActiveFrameStore(NarrowFrameStore nfs)
public void setQueryAllFrameStores(boolean b)
public void setSuppressDuplicates(boolean suppressDuplicates)
public NarrowFrameStore setActiveFrameStore(String name)
public NarrowFrameStore getDelegate()
getDelegate in interface NarrowFrameStorepublic int getFrameCount()
getFrameCount in interface NarrowFrameStorepublic Set getFrames()
getFrames in interface NarrowFrameStorepublic int getClsCount()
getClsCount in interface NarrowFrameStorepublic int getSlotCount()
getSlotCount in interface NarrowFrameStorepublic int getFacetCount()
getFacetCount in interface NarrowFrameStorepublic int getSimpleInstanceCount()
getSimpleInstanceCount in interface NarrowFrameStorepublic Frame getFrame(FrameID id)
getFrame in interface NarrowFrameStore
public List getValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
NarrowFrameStore
getValues in interface NarrowFrameStoreframe - - the frameslot - the slotfacet - the facet. If this is non-null then we are looking at a facet value.isTemplate - to be determined
public int getValuesCount(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
getValuesCount in interface NarrowFrameStore
public void addValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
addValues in interface NarrowFrameStore
public void moveValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
int from,
int to)
NarrowFrameStore
moveValue in interface NarrowFrameStoreframe - the frame (as used in getValues)slot - the slot (as used in getValues)facet - the facet (as used in getValues)isTemplate - whether it is a template (as used in getValues)from - the starting position of a valueto - the position of the value after this call
public void removeValue(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Object value)
removeValue in interface NarrowFrameStore
public void setValues(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate,
Collection values)
setValues in interface NarrowFrameStore
public Set getFrames(Slot slot,
Facet facet,
boolean isTemplate,
Object value)
getFrames in interface NarrowFrameStore
public Set getFramesWithAnyValue(Slot slot,
Facet facet,
boolean isTemplate)
getFramesWithAnyValue in interface NarrowFrameStore
public Set<Frame> getMatchingFrames(Slot slot,
Facet facet,
boolean isTemplate,
String value,
int maxMatches)
getMatchingFrames in interface NarrowFrameStoreslot - the slotfacet - the facetisTemplate - whether we are looking at template valuesvalue - the regexp to use for matchingmaxMatches - the max number of matches (-1 for get all)
KnowledgeBase.getMatchingFramespublic Set<Reference> getReferences(Object value)
getReferences in interface NarrowFrameStore
public Set<Reference> getMatchingReferences(String value,
int maxMatches)
getMatchingReferences in interface NarrowFrameStore
public void executeQuery(Query query,
QueryCallback callback)
NarrowFrameStore
executeQuery in interface NarrowFrameStore
public Set getClosure(Frame frame,
Slot slot,
Facet facet,
boolean isTemplate)
getClosure in interface NarrowFrameStorepublic void deleteFrame(Frame frame)
deleteFrame in interface NarrowFrameStorepublic void close()
close in interface NarrowFrameStorepublic void replaceFrame(Frame frame)
NarrowFrameStore
replaceFrame in interface NarrowFrameStorepublic boolean beginTransaction(String name)
beginTransaction in interface NarrowFrameStorepublic boolean commitTransaction()
commitTransaction in interface NarrowFrameStorepublic boolean rollbackTransaction()
rollbackTransaction in interface NarrowFrameStorepublic TransactionMonitor getTransactionStatusMonitor()
NarrowFrameStore
getTransactionStatusMonitor in interface NarrowFrameStorepublic void reinitialize()
reinitialize in interface NarrowFrameStore
public boolean setCaching(RemoteSession session,
boolean doCache)
setCaching in interface NarrowFrameStore
public void replaceFrame(Frame original,
Frame replacement)
NarrowFrameStore
replaceFrame in interface NarrowFrameStoreoriginal - the frame in the database being replacedreplacement - the replacement frame that does not exist in the database before the call.
|
Protege 3.4.8 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||